{include file=$header_start}
{strip} 
<script src="{$siteroot}/includes/js/admin/leads.js" type="text/javascript"></script> 
<script src="{$siteroot}/includes/js/admin/ajax.js" type="text/javascript" ></script> 
{/strip}

{literal} 
<script type="text/javascript">

function showsuburb(stateid)
{
	if(stateid!='')
	{
		ajax.sendrequest("GET",SITEROOT + "/admin/manageleads/show_suburb.php",{stateid:stateid},"","issuburbDiv");
	}
	else
	{
		document.getElementById('suburbid').value='';
	}
}

function showpostalcode(suburbid)
{
	if(suburbid!='')
	{
		ajax.sendrequest("GET",SITEROOT + "/admin/manageleads/show_suburb.php",{suburbid:suburbid},"","isPostalDiv");
	}
	else
		document.getElementById('postalcode').value='';
}


</script> 
{/literal}
{include file=$header_end}
<div class="contain"> {include file=$left_menu}
  <div class="right_contain">
    <div class="heading_box">Edit Lead Price</div>
    <div class="whitebox"> 
      <!--Message Div Start--> 
      {if $msg}
      <div class="masg_div"> {$msg} </div>
      {/if} 
      <!--Message Div End-->
      
      <form name="frmAddLeads" id="frmAddLeads" action="" method="post">
        <input type="hidden" id="page" name="page" value="{$page}" />
        <input type="hidden" id="leadsId" name="leadsId" value="{$leadsDetArray.lead_id}" />
        <div style="min-height:250px;"> 
          <!--Form Contain start-->
          
          <div class="form_fieldbox">
            <dl>
              <dt>Membership Plan:<span class="error">*</span></dt>
              <dd>
                <select name="plan_id" id="plan_id" class="select">
                  <option value="">--Select plan--</option>
                  
              {section name=i loop=$planArray}
              
                  <option value="{$planArray[i].plan_id}" {if $planArray[i].plan_id eq $leadsDetArray.plan_id} selected="selected" {/if}>{$planArray[i].name}</option>
                  
              {/section}
              
                </select>
              </dd>
              <div class="clear"></div>
            </dl>
            <dl>
              <dt>Region:<span class="error">*</span></dt>
              <dd>
                <select name="regionid" id="regionid" class="select" onchange="showsuburb(this.value);">
                  <option value="">--Select Region--</option>
                  
              {section name=i loop=$stateArray}
              
                  <option value="{$stateArray[i].state_id}" {if $stateArray[i].state_id eq $leadsDetArray.region_id} selected="selected" {/if}>{$stateArray[i].state_name}</option>
                  
              {/section}
              
                </select>
              </dd>
              <div class="clear"></div>
            </dl>
			
           <!-- <dl>
              <dt>Suburb Area:<span class="error">*</span></dt>
              <dd>
                <div id="issuburbDiv">
                  <select name="suburbid" id="suburbid" class="select" onchange="showpostalcode(this.value);">
                    <option value="">--Select Suburb--</option>
                    
                 {section name=i loop=$suburbArray}
                  
                    <option value="{$suburbArray[i].id}" {if $suburbArray[i].id eq $leadsDetArray.suburb_id} selected="selected" {/if}>{$suburbArray[i].suburb}</option>
                    
                  {/section}
              
                  </select>
                </div>
              </dd>
              <div class="clear"></div>
            </dl>
            <dl>
              <dt>Postal code:<span class="error">*</span></dt>
              <dd>
                <div id="isPostalDiv">
                  <input type="text" class="input" name="postalcode" id="postalcode" value="{$leadsDetArray.postalcode}" readonly="readonly" />
                </div>
              </dd>
              <div class="clear"></div>
            </dl>-->
            <dl>
              <dt>Job Type:<span class="error">*</span></dt>
              <dd>
                <select name="jobtypeid" id="jobtypeid" class="select">
                  <option value="">--Select Job Type--</option>
                  
              {section name=i loop=$jobtypeArray}
              
                  <option value="{$jobtypeArray[i].id}" {if $jobtypeArray[i].id eq $leadsDetArray.jobtype} selected="selected" {/if}>{$jobtypeArray[i].trade_category}</option>
                  
              {/section}
              
                </select>
              </dd>
              <div class="clear"></div>
            </dl>
            <dl>
              <dt>Budget:<span class="error">*</span></dt>
              <dd>
                <select name="budget" id="budget" class="select">
                  <option value="">--Select Budget--</option>
                   
                   {section name=i loop=$budgetArray}
                     
                  <option value="{$budgetArray[i].budget_id}" {if $leadsDetArray.budget eq $budgetArray[i].budget_id} selected="selected"{/if}>Under ${$budgetArray[i].budget_name}</option>
                  
                   {/section}  
                  <!--<option value="10-50" {if $leadsDetArray.budget eq '10-50'} selected="selected" {/if}>$10 to $50</option> 
                  <option value="50-100" {if $leadsDetArray.budget eq '50-100'} selected="selected" {/if}>$50 to $100</option> 
                  <option value="100-150" {if $leadsDetArray.budget eq '100-150'} selected="selected" {/if}>$100 to $150</option> 
                  <option value="150-200" {if $leadsDetArray.budget eq '150-200'} selected="selected" {/if}>$150 to $200</option> 
                  <option value="200-250" {if $leadsDetArray.budget eq '200-250'} selected="selected" {/if}>$200 to $250</option>              -->
                </select>
              </dd>
              <div class="clear"></div>
            </dl>
            <dl>
              <dt>Price:<span class="error">*</span></dt>
              <dd>
                <input type="text" class="input" name="price" id="price" value="{$leadsDetArray.price}" />
              </dd>
              <div class="clear"></div>
            </dl>
          </div>
          
          <!--Form Contain end--> 
          
          <!--Button here start-->
          <div> <span>
            <input type="submit" class="admin_btn" value="Submit" name="editleads_btn" id="editleads_btn" />
            </span> <span>
            <input type="button" class="admin_btn" value="Cancel" onclick="window.location='{$siteroot}/admin/home.php?q=leads&page={$smarty.get.page}';"/>
            </span> </div>
          <!--Button here end--> 
          
        </div>
      </form>
    </div>
  </div>
  
  <!--right_contain end-->
  <div class="clear"></div>
</div>
{include file=$footer}